package dao.backstage;

import pojo.Goods;

import java.sql.SQLException;
import java.util.List;

public interface GoodsDao {
    //新增：商品上架
    int addGoods(Goods goods);

    //修改
    int updateGoods(Goods goods);

    //删除：商品下架
    int removeGoods(String id);

    //查询：根据商品名称查询
    List<Goods> queryByName(String goods_name) throws SQLException;

    //根据类型查询
    List<Goods> queryByType(int type_id) throws SQLException;

    //查询全部商品
    List<Goods> queryAll() throws SQLException;
}
